Skip to content

security: remove sensitive data from logs and escape HTML in tx details - #4677

Open
Ismail-Benali wants to merge 2 commits into
monero-project:masterfrom
Ismail-Benali:fix/security-logging-and-html-escaping
Open

security: remove sensitive data from logs and escape HTML in tx details#4677
Ismail-Benali wants to merge 2 commits into
monero-project:masterfrom
Ismail-Benali:fix/security-logging-and-html-escaping

Conversation

@Ismail-Benali

@Ismail-Benali Ismail-Benali commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Two low-severity security hardening changes in the QML UI.

1. Stop logging sensitive wallet data

Several console.log calls wrote transaction IDs, wallet addresses, payment IDs and payment-proof signatures to the debug output:

  • pages/History.qml: proof generation logged txid + address
  • pages/TxKey.qml: proof generation and verification logged txid + address + signature
  • pages/AddressBook.qml: sending logged address + paymentId
  • main.qml: failed wallet open logged wallet.address

A payment-proof signature is a signed proof of ownership; writing it to the log alongside the txid weakens the proof's usefulness if the log ever leaks.

2. Escape HTML in the transaction details dialog

buildTxDetailsString in pages/History.qml builds a rich-text table (StandardDialog uses TextEdit.AutoText) with values that originate from the user or the chain. Only tx_note was escaped; the remaining fields (tx_id, address, paymentId, integratedAddress, tx_key, rings, destinations) were inserted raw. All fields are now passed through Utils.htmlEscape(). The intentional <br> line separators inside the destinations field are restored after escaping so the display is unchanged.

Files changed

  • main.qml
  • pages/AddressBook.qml
  • pages/History.qml
  • pages/TxKey.qml

Testing

Not built; changes are limited to removing log lines and HTML-escaping string interpolation. No functional behavior is intended to change.

Remove console.log statements that printed transaction IDs, wallet
addresses, payment IDs and payment-proof signatures to the debug log.

Escape all user/chain-supplied fields in buildTxDetailsString before
inserting them into the rich-text table shown in the transaction
details dialog, preserving the intentional <br> line separators in the
destinations field.
@Ismail-Benali
Ismail-Benali force-pushed the fix/security-logging-and-html-escaping branch from 91c474d to b712912 Compare August 5, 2026 23:03
@nahuhh

nahuhh commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Not 100% sure (worth checking), but i think active wallet primary address is logged on the default lvl (from wallet2) when you open the wallet, so removing when you close the wallet wouldnt help there.

the logging of the address is also normal in other programs, such as monero-wallet-rpc

@jpk68

jpk68 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Yes, there is still some logging of sensitive data, namely here and here.

@Ismail-Benali

Copy link
Copy Markdown
Author

Thanks for the review @jpk68 and @nahuhh.

@jpk68: you're right — I had missed those two spots. I've now removed the console.log calls in handleGetProof and handleCheckProof (txid, address, message and the payment-proof signature) in commit 5efbc6d, so the same class of sensitive data is no longer written to the logs there either.

@nahuhh: good point about wallet2 logging the primary address at the default level on open. That logging lives in the monero-core submodule (wallet2.cpp), which is outside this repository, so it can't be changed in this PR. Our changes here only remove the additional GUI-side logging of addresses/txids/signatures on top of what the core already emits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants